package six.event.trigrams.impl;

import six.event.trigrams.Trigrams;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import java.util.stream.Collectors;
import java.util.stream.Stream;

/**
 * @author jiangjinjian
 * @date 2024/5/9 8:50
 * @description 数字起卦
 */
public class NumberTrigrams implements Trigrams {

    public List<String> trigrams() {
        return Stream.iterate(1, t -> t + 1).limit(3)
                .map(i -> getRandom01()).collect(Collectors.toList());
    }

    private String getRandom01() {
        return String.valueOf(new Random().nextInt(2));
    }
}
